import request from '@/utils/request'

// 查询待处理
export function getWaitingToDoApi(query) {
  return request({
    url: '/business/exception/getprocessinglist',
    method: 'get',
    params: query
  })
}

// 确认订单
export function getAccomplishedApi(query) {
  return request({
    url: '/business/exception/getextremely',
    method: 'get',
    params: query
  })
}

// 拉取订单信息
export function adoptApi(account) {
  return request({
    url: '/business/exception/adopt/' + account,
    method: 'get'
  })
}

// 处理完成
export function completedList(data) {
  return request({
    url: '/business/exception/completedList',
    method: 'get',
    data
  })
}

// 创建订单
export function addAbnormalApi(data) {
  return request({
    url: '/business/exception/addAbnormal',
    method: 'post',
    data
  })
}





// 查询列表
export function listManagement(query) {
    return request({
        url: '/business/exception/list',
        method: 'get',
        params: query
    })
}
// 查询统计列表
export function getStatistics() {
    return request({
        url: '/business/exception/getStatistics',
        method: 'get',
    })
}
//查询类目下包含的数据
export function unboundPhonesByCategory(categoryId) {
    return request({
        url: '/business/phone/unboundPhonesByCategory/' + categoryId,
        method: 'get'
    })
}
//恢复入库
export function returnStorage(data) {
    return request({
        url: '/business/exception/returnStorage',
        method: 'post',
        data
    })
}
//完结出库
export function completeCheckout(data) {
    return request({
        url: '/business/exception/completeCheckout',
        method: 'post',
        data
    })
}
// 修改异常原因
export function modifyExceptionCause(data) {
    return request({
        url: '/business/exception/modifyExceptionCause',
        method: 'post',
        data
    })
}
